package c_02;

/**
 * @author fu-xiao-liu
 * @Date 2022/5/23 23:36
 * <p>
 * 二进制字节码（类基本信息，常量池，类方法定义，包含了虚拟机指令）
 * javap -v 类.class
 */
public class Demo01 {
    public static void main(String[] args) {

         String a = new String("123")+new String("456");
        System.out.println(a.hashCode());
        //System.out.println(a == "123456");
        String intern = a.intern();
        System.out.println(a == "123456");
        System.out.println(a.hashCode());
        System.out.println(intern == "123456");


        String s1  = "0";
        String s2  = "0";

        String s3 = s1 + s2;

        System.out.println(s1 ==s2);
        System.out.println(2);
        String string1 = new String("1")
                + new String("2");

        string1.intern();
    }
}
